package com.lfs.adapter.base.alipay;

import com.lfs.adapter.base.LfsGameAdapter;
import com.lfs.adapter.base.alipay.util.AlipayHttpUtil;
import com.lfs.interfaces.dto.ResultReturn;
import com.lfs.interfaces.model.ChannelSupplier;
import com.lfs.interfaces.model.GameBaseResponse;
import com.lfs.interfaces.model.dto.OrderDto;
import com.lfs.interfaces.model.vo.ChargeVo;

import java.math.BigDecimal;

public class AlipayAdapter implements LfsGameAdapter {

    public ResultReturn<ChargeVo> makeOrder(OrderDto rec, ChannelSupplier config) {
        // 调用上游接口发单
        ResultReturn<ChargeVo> response = new AlipayHttpUtil(config).submitOrder(rec);
        return response;
    }

    public GameBaseResponse queryOrder(OrderDto rec, ChannelSupplier config) {
        return null;
    }

    public BigDecimal queryBalance(ChannelSupplier config) {
        return null;
    }

    public String handleCallback(String orderNo, String status, String upOrderNo) {
        return new AlipayHttpUtil(null).notify(orderNo,status,upOrderNo);
    }
}
